package com.sky.d_design_pattern;

public class Client {
	
	public Data request(final String queryStr){
		final FutureData future = new FutureData();
		new Thread(){
			public void run() {
				//RealData构造很慢，单独线程执行
				RealData realData = new RealData(queryStr);
				future.setRealData(realData);
			};
		}.start();
		return future;		//会被立即返回
	}

}
